package yr.website

class User {
    String name
    String phone
    String email
    String message
    Date recordDate
    /**
     * 映射。
     */
    static mapping = {
        table "sys_users"
        version false
        name(column: "name", sqlType: "varchar(10)")
        email(column: "email", sqlType: "varchar(20)")
        phone(column: "phone", sqlType: "varchar(11)")
        recordDate(column: "record_date", sqlType: "datetime")
        message(column: "message", sqlType: "varchar(100)")
    }

    static constraints = {
        name(nullable: false, unique: false)
        email(nullable: false, unique: false)
        phone(nullable: false, unique: false)
        recordDate(nullable: false, unique: false)
        message(nullable: false, unique: false)
    }
}
